import VueRouter from 'vue-router'
// 四个页面组件
import HomeContainer from './components/TabberContainer/HomeContainer.vue'
import MenberContainer from './components/TabberContainer/MenberContainer.vue'
import SearchContainer from './components/TabberContainer/SearchContainer.vue'
import ShopcarContainer from './components/TabberContainer/ShopcarContainer.vue'

// 新闻资讯组件
import NewsList from './components/new/NewsList.vue'
import NewDetail from './components/new/NewDetail.vue'

// 图片资讯组件
import PhotoList from './components/photo/PhotoList.vue'
import PhotoInfo from './components/photo/PhotoInfo.vue'

// 商品购买组件
import GoodsList from './components/goods/GoodsList.vue'
import GoodsInfo from './components/goods/GoodInfo.vue'
import GoodsDesc from './components/goods/GoodsDesc.vue'
import GoodsComment from './components/goods/GoodsComment.vue'

// 注册组件
import Register from './components/login/Register.vue'
import ForgetPassword from './components/login/ForgetPassword.vue'

// 留言反馈
import CommentList from './components/comment/CommentList.vue'

// 视频列表
import VideoList from './components/video/VideoList.vue'

export default new VueRouter({
    // 默认替换 router-link-acive
    linkActiveClass: 'mui-active',
    // routes不是routers
    routes: [
        {
            path:'/',
            redirect:'/home'
        },
        {
            path: '/home',
            component: HomeContainer
        },
        {
            path: '/home/newList',
            component: NewsList
        },
        {
            path: '/home/newLsit/newDetail/:id',
            component: NewDetail
        },
        {
            path: '/home/photolist',
            component: PhotoList
        },
        {
            path: '/home/photoinfo/:id',
            component: PhotoInfo
        },
        {
            path:'/home/goodslist',
            component:GoodsList
        },
        {
            path:'/home/goodsinfo/:id',
            component:GoodsInfo,
            name:'goodsinfo'
        },
        {
            path:'/home/goodsdesc/:id',
            component:GoodsDesc,
            name:'goodsdesc'
        },
        {
            path:'/home/goodscomment/:id',
            component:GoodsComment,
            name:'goodscomment'
        },
        {
            path:'/home/commentlist/:id',
            component:CommentList
        },
        {
            path: '/menber',
            component: MenberContainer
        },
        {
            path:'/menber/register',
            component:Register
        },
        {
            path:'/menber/forgetpassword',
            component:ForgetPassword
        },
        {
            path: '/shopcar',
            component: ShopcarContainer
        },
        {
            path: '/search',
            component: SearchContainer
        },
        {
            path:'/home/videolist',
            component:VideoList
        }

    ]
})